/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package view;

import connection.InformationHandler;
import connection.RouterHandler;

import java.awt.Color;
import java.awt.Component;
import java.awt.event.KeyEvent;
import java.awt.event.KeyListener;
import java.awt.event.KeyAdapter;
import java.io.IOException;
import java.net.ConnectException;
import java.net.SocketException;
import java.net.UnknownHostException;
import java.util.ArrayList;
import java.util.Timer;
import java.util.TimerTask;
import java.util.concurrent.Executors;
import java.util.concurrent.ScheduledExecutorService;
import java.util.concurrent.ScheduledFuture;
import java.util.concurrent.TimeUnit;
import java.util.logging.Level;
import java.util.logging.Logger;

import javax.swing.*;
import javax.swing.table.DefaultTableModel;
import javax.swing.text.JTextComponent;

import util.Validation;
import model.GUISolutionModel;
//import model.SuggestionBoxModel;
import thread.Init;

/**
 *
 * @author JH
 */
public class CLI extends javax.swing.JPanel {

    /**
     *
     */
    private static final long serialVersionUID = 1L;
    /**
     * ....................... Creates new form CLI
     */
    JTextField textField;
    ArrayList<String> db = new ArrayList<>();
    ArrayList<String> data = new ArrayList<>();
    String selection;
    JTextComponent comboBoxEditor;
    int curruentPosition = 0;
    RouterHandler globalRouterHandler;
    private MainInterface mi;
    private int index;
    private String host;
    private int port;
    private String version;
    private DefaultListModel<String> staticListModel;
    private DefaultListModel<String> dynamicListModel;
    private DefaultTableModel statusTableModel;
    public InformationHandler ih;
    private Timer timer;

    // classe interna que pinta a lista de status das interfaces de verde ou
    // vermelho
    private static class GreenRedCellRenderer extends DefaultListCellRenderer {

        /**
         *
         */
        private static final long serialVersionUID = 1L;

        public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus) {
            Component c = super.getListCellRendererComponent(list, value, index, isSelected, cellHasFocus);
            String line = (String) value;
            if (line.contains("is down")) {
                c.setBackground(Color.red);
            } else {
                c.setBackground(Color.green);
            }
            return c;
        }
    }
    
    public CLI() {
        initComponents();
    }

    public CLI(String host, int port, int index, MainInterface mi) throws ConnectException, SocketException, IOException {
        initComponents();

        this.mi = mi;
        this.host = host;
        this.port = port;
        this.index = index;

        GUISolutionModel GuiSol = new GUISolutionModel(ConsolejTextArea, ClockjLabel, InterfacesjLabel, TypejLabel, IosjLabel, DyRjList,
                RjList, interfaceSerialTypeList, interfacesJTabbedPane, mi, index);

        globalRouterHandler = new RouterHandler(host, port, GuiSol);

        // vlan 10.255.0.150
        GuiSol.setRouterHandler(globalRouterHandler);
        Init init = new Init(globalRouterHandler);
        init.start();
    }

    public String getRouterName() {
        return globalRouterHandler.getRouterName();
    }

    /**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed"
    // <editor-fold defaultstate="collapsed"
    // <editor-fold defaultstate="collapsed"
    // <editor-fold defaultstate="collapsed"
    // <editor-fold defaultstate="collapsed"
    // <editor-fold defaultstate="collapsed"
    // <editor-fold defaultstate="collapsed"
    // <editor-fold defaultstate="collapsed"
    // <editor-fold defaultstate="collapsed"
    // <editor-fold defaultstate="collapsed"
    // <editor-fold defaultstate="collapsed"
    // <editor-fold defaultstate="collapsed"
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        SettingsjFrame = new javax.swing.JFrame();
        jTabbedPane4 = new javax.swing.JTabbedPane();
        jPanel5 = new javax.swing.JPanel();
        jLabel1 = new javax.swing.JLabel();
        jLabel2 = new javax.swing.JLabel();
        jLabel3 = new javax.swing.JLabel();
        DatejFormattedTextField = new javax.swing.JFormattedTextField();
        TimejFormattedTextField = new javax.swing.JFormattedTextField();
        HostNamejTextField = new javax.swing.JTextField();
        GlobalCanceljButton = new javax.swing.JButton();
        GlobalOkjButton = new javax.swing.JButton();
        jPanel6 = new javax.swing.JPanel();
        jLabel4 = new javax.swing.JLabel();
        jLabel5 = new javax.swing.JLabel();
        jLabel6 = new javax.swing.JLabel();
        SecretjPasswordField = new javax.swing.JPasswordField();
        VTYjPasswordField = new javax.swing.JPasswordField();
        EnablejPasswordField = new javax.swing.JPasswordField();
        PasswordCanceljButton = new javax.swing.JButton();
        PasswordOkjButton = new javax.swing.JButton();
        InterfacesConfigjFrame = new javax.swing.JFrame();
        interfacesJTabbedPane = new javax.swing.JTabbedPane();
        SwitchingjFrame = new javax.swing.JFrame();
        jLabel7 = new javax.swing.JLabel();
        jLabel8 = new javax.swing.JLabel();
        jLabel9 = new javax.swing.JLabel();
        VlanNumberjTextField = new javax.swing.JTextField();
        VlanNamejTextField = new javax.swing.JTextField();
        VlanOkjButton = new javax.swing.JButton();
        VlanCanceljButton = new javax.swing.JButton();
        RoutingjFrame = new javax.swing.JFrame();
        jTabbedPane5 = new javax.swing.JTabbedPane();
        jPanel8 = new javax.swing.JPanel();
        jLabel14 = new javax.swing.JLabel();
        DyRNetworkjTextField1 = new javax.swing.JTextField();
        jLabel15 = new javax.swing.JLabel();
        AddDyRoutejButton1 = new javax.swing.JButton();
        jSeparator2 = new javax.swing.JSeparator();
        jLabel21 = new javax.swing.JLabel();
        jScrollPane3 = new javax.swing.JScrollPane();
        DyRjList = new javax.swing.JList();
        DyRRemovejButton = new javax.swing.JButton();
        jPanel7 = new javax.swing.JPanel();
        jLabel10 = new javax.swing.JLabel();
        jLabel11 = new javax.swing.JLabel();
        jLabel12 = new javax.swing.JLabel();
        jLabel13 = new javax.swing.JLabel();
        RNetworkjTextField = new javax.swing.JTextField();
        RMaskjTextField = new javax.swing.JTextField();
        RNextHopjTextField = new javax.swing.JTextField();
        AddRoutejButton = new javax.swing.JButton();
        jSeparator1 = new javax.swing.JSeparator();
        jLabel20 = new javax.swing.JLabel();
        jScrollPane2 = new javax.swing.JScrollPane();
        RjList = new javax.swing.JList();
        RRemovejButton = new javax.swing.JButton();
        ConnectivityjFrame = new javax.swing.JFrame();
        jPanel3 = new javax.swing.JPanel();
        jLabel22 = new javax.swing.JLabel();
        ConnectivityIPTextField = new javax.swing.JTextField();
        ConnectivityPingButton = new javax.swing.JButton();
        CommandHelpjFrame = new javax.swing.JFrame();
        jLabel17 = new javax.swing.JLabel();
        jLabel18 = new javax.swing.JLabel();
        jTextField1 = new javax.swing.JTextField();
        jButton1 = new javax.swing.JButton();
        jScrollPane4 = new javax.swing.JScrollPane();
        jTable1 = new javax.swing.JTable();
        InterfacesStatusjFrame = new javax.swing.JFrame();
        jLabel16 = new javax.swing.JLabel();
        jScrollPane6 = new javax.swing.JScrollPane();
        InterfaceStatusjTable = new javax.swing.JTable();
        InterfacesSerialTypejFrame = new javax.swing.JFrame();
        jPanel2 = new javax.swing.JPanel();
        jScrollPane5 = new javax.swing.JScrollPane();
        interfaceSerialTypeList = new javax.swing.JList();
        jScrollPane1 = new javax.swing.JScrollPane();
        ConsolejTextArea = new javax.swing.JTextArea();
        SendjButton = new javax.swing.JButton();
        jToolBar1 = new javax.swing.JToolBar();
        ClockjLabel = new javax.swing.JLabel();
        jToolBar2 = new javax.swing.JToolBar();
        InterfacesjLabel = new javax.swing.JLabel();
        jToolBar3 = new javax.swing.JToolBar();
        TypejLabel = new javax.swing.JLabel();
        jToolBar4 = new javax.swing.JToolBar();
        IosjLabel = new javax.swing.JLabel();
        levelselectorJComboBox = new javax.swing.JComboBox();
        CommandjComboBox = new javax.swing.JComboBox();

        SettingsjFrame.setTitle("Settings");
        SettingsjFrame.setLocationByPlatform(true);
        SettingsjFrame.setMinimumSize(new java.awt.Dimension(400, 300));

        jTabbedPane4.setTabPlacement(javax.swing.JTabbedPane.LEFT);

        jLabel1.setText("Hostname:");

        jLabel2.setText("Router Date:");

        jLabel3.setText("Router Time:");

        DatejFormattedTextField.setFormatterFactory(new javax.swing.text.DefaultFormatterFactory(new javax.swing.text.DateFormatter()));
        DatejFormattedTextField.setText("01/01/2001");

        TimejFormattedTextField.setFormatterFactory(new javax.swing.text.DefaultFormatterFactory(new javax.swing.text.DateFormatter(java.text.DateFormat.getTimeInstance())));
        TimejFormattedTextField.setText("01:01:01");
        TimejFormattedTextField.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                TimejFormattedTextFieldActionPerformed(evt);
            }
        });

        HostNamejTextField.setText("Router");

        GlobalCanceljButton.setText("Cancel");

        GlobalOkjButton.setText("OK");
        GlobalOkjButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                GlobalOkjButtonActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanel5Layout = new javax.swing.GroupLayout(jPanel5);
        jPanel5.setLayout(jPanel5Layout);
        jPanel5Layout.setHorizontalGroup(
            jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel5Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel5Layout.createSequentialGroup()
                        .addComponent(jLabel3)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(TimejFormattedTextField, javax.swing.GroupLayout.DEFAULT_SIZE, 132, Short.MAX_VALUE)
                        .addGap(99, 99, 99))
                    .addGroup(jPanel5Layout.createSequentialGroup()
                        .addComponent(GlobalOkjButton)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addComponent(GlobalCanceljButton)
                        .addContainerGap())
                    .addGroup(jPanel5Layout.createSequentialGroup()
                        .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jLabel2)
                            .addComponent(jLabel1))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(HostNamejTextField)
                            .addComponent(DatejFormattedTextField))
                        .addGap(99, 99, 99))))
        );
        jPanel5Layout.setVerticalGroup(
            jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel5Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel1)
                    .addComponent(HostNamejTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel2)
                    .addComponent(DatejFormattedTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel3)
                    .addComponent(TimejFormattedTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 156, Short.MAX_VALUE)
                .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(GlobalOkjButton)
                    .addComponent(GlobalCanceljButton))
                .addContainerGap())
        );

        jTabbedPane4.addTab("Global", jPanel5);

        jLabel4.setText("Enable Secret Password:");

        jLabel5.setText("VTY Password:");

        jLabel6.setText("Enable Password:");

        SecretjPasswordField.setText("cisco");

        VTYjPasswordField.setText("cisco");

        EnablejPasswordField.setText("cisco");

        PasswordCanceljButton.setText("Cancel");

        PasswordOkjButton.setText("OK");
        PasswordOkjButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                PasswordOkjButtonActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanel6Layout = new javax.swing.GroupLayout(jPanel6);
        jPanel6.setLayout(jPanel6Layout);
        jPanel6Layout.setHorizontalGroup(
            jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel6Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel6Layout.createSequentialGroup()
                        .addComponent(PasswordOkjButton)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addComponent(PasswordCanceljButton))
                    .addGroup(jPanel6Layout.createSequentialGroup()
                        .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                            .addGroup(jPanel6Layout.createSequentialGroup()
                                .addComponent(jLabel4)
                                .addGap(31, 31, 31)
                                .addComponent(SecretjPasswordField, javax.swing.GroupLayout.DEFAULT_SIZE, 99, Short.MAX_VALUE))
                            .addGroup(jPanel6Layout.createSequentialGroup()
                                .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(jLabel5)
                                    .addComponent(jLabel6))
                                .addGap(65, 65, 65)
                                .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                                    .addComponent(VTYjPasswordField, javax.swing.GroupLayout.DEFAULT_SIZE, 99, Short.MAX_VALUE)
                                    .addComponent(EnablejPasswordField))))
                        .addGap(0, 44, Short.MAX_VALUE)))
                .addContainerGap())
        );
        jPanel6Layout.setVerticalGroup(
            jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel6Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel5)
                    .addComponent(VTYjPasswordField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel6)
                    .addComponent(EnablejPasswordField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel4)
                    .addComponent(SecretjPasswordField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 156, Short.MAX_VALUE)
                .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(PasswordOkjButton)
                    .addComponent(PasswordCanceljButton))
                .addContainerGap())
        );

        jTabbedPane4.addTab("Password", jPanel6);

        javax.swing.GroupLayout SettingsjFrameLayout = new javax.swing.GroupLayout(SettingsjFrame.getContentPane());
        SettingsjFrame.getContentPane().setLayout(SettingsjFrameLayout);
        SettingsjFrameLayout.setHorizontalGroup(
            SettingsjFrameLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(SettingsjFrameLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jTabbedPane4)
                .addContainerGap())
        );
        SettingsjFrameLayout.setVerticalGroup(
            SettingsjFrameLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(SettingsjFrameLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jTabbedPane4)
                .addContainerGap())
        );

        InterfacesConfigjFrame.setTitle("Config Interfaces");
        InterfacesConfigjFrame.setLocationByPlatform(true);
        InterfacesConfigjFrame.setMinimumSize(new java.awt.Dimension(350, 350));

        interfacesJTabbedPane.setTabPlacement(javax.swing.JTabbedPane.LEFT);

        javax.swing.GroupLayout InterfacesConfigjFrameLayout = new javax.swing.GroupLayout(InterfacesConfigjFrame.getContentPane());
        InterfacesConfigjFrame.getContentPane().setLayout(InterfacesConfigjFrameLayout);
        InterfacesConfigjFrameLayout.setHorizontalGroup(
            InterfacesConfigjFrameLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(InterfacesConfigjFrameLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(interfacesJTabbedPane, javax.swing.GroupLayout.DEFAULT_SIZE, 280, Short.MAX_VALUE)
                .addContainerGap())
        );
        InterfacesConfigjFrameLayout.setVerticalGroup(
            InterfacesConfigjFrameLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(InterfacesConfigjFrameLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(interfacesJTabbedPane, javax.swing.GroupLayout.DEFAULT_SIZE, 278, Short.MAX_VALUE)
                .addContainerGap())
        );

        SwitchingjFrame.setTitle("Switching");
        SwitchingjFrame.setLocationByPlatform(true);
        SwitchingjFrame.setMinimumSize(new java.awt.Dimension(178, 157));

        jLabel7.setText("VLAN Configuration:");

        jLabel8.setText("Number:");

        jLabel9.setText("Name:");

        VlanOkjButton.setText("OK");
        VlanOkjButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                VlanOkjButtonActionPerformed(evt);
            }
        });

        VlanCanceljButton.setText("Cancel");

        javax.swing.GroupLayout SwitchingjFrameLayout = new javax.swing.GroupLayout(SwitchingjFrame.getContentPane());
        SwitchingjFrame.getContentPane().setLayout(SwitchingjFrameLayout);
        SwitchingjFrameLayout.setHorizontalGroup(
            SwitchingjFrameLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(SwitchingjFrameLayout.createSequentialGroup()
                .addGroup(SwitchingjFrameLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(SwitchingjFrameLayout.createSequentialGroup()
                        .addGap(16, 16, 16)
                        .addGroup(SwitchingjFrameLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jLabel7)
                            .addGroup(SwitchingjFrameLayout.createSequentialGroup()
                                .addGroup(SwitchingjFrameLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addGroup(SwitchingjFrameLayout.createSequentialGroup()
                                        .addGap(4, 4, 4)
                                        .addComponent(jLabel9))
                                    .addComponent(jLabel8))
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addGroup(SwitchingjFrameLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                                    .addComponent(VlanNumberjTextField)
                                    .addComponent(VlanNamejTextField, javax.swing.GroupLayout.DEFAULT_SIZE, 65, Short.MAX_VALUE)))))
                    .addGroup(SwitchingjFrameLayout.createSequentialGroup()
                        .addContainerGap()
                        .addComponent(VlanOkjButton)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(VlanCanceljButton)))
                .addContainerGap(50, Short.MAX_VALUE))
        );
        SwitchingjFrameLayout.setVerticalGroup(
            SwitchingjFrameLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(SwitchingjFrameLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jLabel7)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(SwitchingjFrameLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel8)
                    .addComponent(VlanNumberjTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(SwitchingjFrameLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel9)
                    .addComponent(VlanNamejTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(SwitchingjFrameLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(VlanOkjButton)
                    .addComponent(VlanCanceljButton))
                .addContainerGap(51, Short.MAX_VALUE))
        );

        RoutingjFrame.setTitle("Routing");
        RoutingjFrame.setLocationByPlatform(true);
        RoutingjFrame.setMinimumSize(new java.awt.Dimension(564, 329));

        jTabbedPane5.setTabPlacement(javax.swing.JTabbedPane.LEFT);

        jLabel14.setText("New Route:");

        jLabel15.setText("Network:");

        AddDyRoutejButton1.setText("Add");
        AddDyRoutejButton1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                AddDyRoutejButton1ActionPerformed(evt);
            }
        });

        jSeparator2.setOrientation(javax.swing.SwingConstants.VERTICAL);

        jLabel21.setText("Established Routes:");

        jScrollPane3.setViewportView(DyRjList);

        DyRRemovejButton.setText("Remove");
        DyRRemovejButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                DyRRemovejButtonActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanel8Layout = new javax.swing.GroupLayout(jPanel8);
        jPanel8.setLayout(jPanel8Layout);
        jPanel8Layout.setHorizontalGroup(
            jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel8Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel14)
                    .addGroup(jPanel8Layout.createSequentialGroup()
                        .addComponent(jLabel15)
                        .addGap(14, 14, 14)
                        .addComponent(DyRNetworkjTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, 105, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addComponent(AddDyRoutejButton1))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jSeparator2, javax.swing.GroupLayout.PREFERRED_SIZE, 15, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel8Layout.createSequentialGroup()
                        .addComponent(jLabel21)
                        .addGap(0, 287, Short.MAX_VALUE))
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel8Layout.createSequentialGroup()
                        .addGap(0, 0, Short.MAX_VALUE)
                        .addComponent(DyRRemovejButton))
                    .addComponent(jScrollPane3, javax.swing.GroupLayout.Alignment.TRAILING))
                .addContainerGap())
        );
        jPanel8Layout.setVerticalGroup(
            jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel8Layout.createSequentialGroup()
                .addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(jSeparator2)
                    .addGroup(jPanel8Layout.createSequentialGroup()
                        .addContainerGap()
                        .addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(jPanel8Layout.createSequentialGroup()
                                .addComponent(jLabel14)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                    .addComponent(jLabel15)
                                    .addComponent(DyRNetworkjTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(AddDyRoutejButton1)
                                .addGap(0, 211, Short.MAX_VALUE))
                            .addGroup(jPanel8Layout.createSequentialGroup()
                                .addComponent(jLabel21)
                                .addGap(7, 7, 7)
                                .addComponent(jScrollPane3, javax.swing.GroupLayout.PREFERRED_SIZE, 213, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                .addComponent(DyRRemovejButton)))))
                .addContainerGap())
        );

        jTabbedPane5.addTab("Dynamic", jPanel8);

        jLabel10.setText("New Route:");

        jLabel11.setText("Network:");

        jLabel12.setText("Mask:");

        jLabel13.setText("Next Hop:");

        AddRoutejButton.setText("Add");
        AddRoutejButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                AddRoutejButtonActionPerformed(evt);
            }
        });

        jSeparator1.setOrientation(javax.swing.SwingConstants.VERTICAL);

        jLabel20.setText("Established Routes:");

        RjList.setModel(new javax.swing.AbstractListModel() {
            String[] strings = { "Item 1", "Item 2", "Item 3", "Item 4", "Item 5" };
            public int getSize() { return strings.length; }
            public Object getElementAt(int i) { return strings[i]; }
        });
        jScrollPane2.setViewportView(RjList);

        RRemovejButton.setText("Remove");
        RRemovejButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                RRemovejButtonActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanel7Layout = new javax.swing.GroupLayout(jPanel7);
        jPanel7.setLayout(jPanel7Layout);
        jPanel7Layout.setHorizontalGroup(
            jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel7Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel10)
                    .addGroup(jPanel7Layout.createSequentialGroup()
                        .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jLabel11)
                            .addComponent(jLabel12)
                            .addComponent(jLabel13))
                        .addGap(14, 14, 14)
                        .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                            .addComponent(RNextHopjTextField, javax.swing.GroupLayout.DEFAULT_SIZE, 96, Short.MAX_VALUE)
                            .addComponent(RMaskjTextField, javax.swing.GroupLayout.Alignment.TRAILING)
                            .addComponent(RNetworkjTextField)))
                    .addComponent(AddRoutejButton))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(jSeparator1, javax.swing.GroupLayout.PREFERRED_SIZE, 15, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel7Layout.createSequentialGroup()
                        .addComponent(jLabel20)
                        .addGap(0, 287, Short.MAX_VALUE))
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel7Layout.createSequentialGroup()
                        .addGap(0, 0, Short.MAX_VALUE)
                        .addComponent(RRemovejButton))
                    .addComponent(jScrollPane2, javax.swing.GroupLayout.Alignment.TRAILING))
                .addContainerGap())
        );
        jPanel7Layout.setVerticalGroup(
            jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jSeparator1)
            .addGroup(jPanel7Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel7Layout.createSequentialGroup()
                        .addComponent(jLabel10)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel11)
                            .addComponent(RNetworkjTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel12)
                            .addComponent(RMaskjTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel13)
                            .addComponent(RNextHopjTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(AddRoutejButton)
                        .addGap(0, 159, Short.MAX_VALUE))
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel7Layout.createSequentialGroup()
                        .addComponent(jLabel20)
                        .addGap(7, 7, 7)
                        .addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 213, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addComponent(RRemovejButton)))
                .addContainerGap())
        );

        jTabbedPane5.addTab("Static", jPanel7);

        javax.swing.GroupLayout RoutingjFrameLayout = new javax.swing.GroupLayout(RoutingjFrame.getContentPane());
        RoutingjFrame.getContentPane().setLayout(RoutingjFrameLayout);
        RoutingjFrameLayout.setHorizontalGroup(
            RoutingjFrameLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(RoutingjFrameLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jTabbedPane5))
        );
        RoutingjFrameLayout.setVerticalGroup(
            RoutingjFrameLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(RoutingjFrameLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jTabbedPane5)
                .addContainerGap())
        );

        ConnectivityjFrame.setTitle("Connectivity");
        ConnectivityjFrame.setLocationByPlatform(true);
        ConnectivityjFrame.setMinimumSize(new java.awt.Dimension(229, 148));

        jLabel22.setText("Ping IP:");

        ConnectivityPingButton.setText("OK");
        ConnectivityPingButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                ConnectivityPingButtonActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(jPanel3);
        jPanel3.setLayout(jPanel3Layout);
        jPanel3Layout.setHorizontalGroup(
            jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel3Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel3Layout.createSequentialGroup()
                        .addComponent(jLabel22)
                        .addGap(18, 18, 18)
                        .addComponent(ConnectivityIPTextField, javax.swing.GroupLayout.PREFERRED_SIZE, 105, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addComponent(ConnectivityPingButton))
                .addContainerGap(59, Short.MAX_VALUE))
        );
        jPanel3Layout.setVerticalGroup(
            jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel3Layout.createSequentialGroup()
                .addGap(22, 22, 22)
                .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel22)
                    .addComponent(ConnectivityIPTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(18, 18, 18)
                .addComponent(ConnectivityPingButton)
                .addContainerGap(25, Short.MAX_VALUE))
        );

        javax.swing.GroupLayout ConnectivityjFrameLayout = new javax.swing.GroupLayout(ConnectivityjFrame.getContentPane());
        ConnectivityjFrame.getContentPane().setLayout(ConnectivityjFrameLayout);
        ConnectivityjFrameLayout.setHorizontalGroup(
            ConnectivityjFrameLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 229, Short.MAX_VALUE)
            .addGroup(ConnectivityjFrameLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addComponent(jPanel3, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        ConnectivityjFrameLayout.setVerticalGroup(
            ConnectivityjFrameLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 108, Short.MAX_VALUE)
            .addGroup(ConnectivityjFrameLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addComponent(jPanel3, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        CommandHelpjFrame.setTitle("Command Help");
        CommandHelpjFrame.setLocationByPlatform(true);
        CommandHelpjFrame.setMinimumSize(new java.awt.Dimension(400, 300));

        jLabel17.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        jLabel17.setText("HELP:");

        jLabel18.setText("Command:");

        jButton1.setText("Show Information");

        jTable1.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {

            },
            new String [] {
                "Command", "Information"
            }
        ) {
            Class[] types = new Class [] {
                java.lang.String.class, java.lang.String.class
            };

            public Class getColumnClass(int columnIndex) {
                return types [columnIndex];
            }
        });
        jScrollPane4.setViewportView(jTable1);

        javax.swing.GroupLayout CommandHelpjFrameLayout = new javax.swing.GroupLayout(CommandHelpjFrame.getContentPane());
        CommandHelpjFrame.getContentPane().setLayout(CommandHelpjFrameLayout);
        CommandHelpjFrameLayout.setHorizontalGroup(
            CommandHelpjFrameLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(CommandHelpjFrameLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(CommandHelpjFrameLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jScrollPane4, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE)
                    .addGroup(CommandHelpjFrameLayout.createSequentialGroup()
                        .addGroup(CommandHelpjFrameLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(CommandHelpjFrameLayout.createSequentialGroup()
                                .addGap(10, 10, 10)
                                .addComponent(jLabel18)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(jTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, 216, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(jButton1))
                            .addComponent(jLabel17))
                        .addGap(0, 0, Short.MAX_VALUE)))
                .addContainerGap())
        );
        CommandHelpjFrameLayout.setVerticalGroup(
            CommandHelpjFrameLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(CommandHelpjFrameLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jLabel17)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(CommandHelpjFrameLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel18)
                    .addComponent(jTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jButton1))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jScrollPane4, javax.swing.GroupLayout.PREFERRED_SIZE, 275, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        InterfacesStatusjFrame.setTitle("Interface Status");
        InterfacesStatusjFrame.setLocationByPlatform(true);
        InterfacesStatusjFrame.setMinimumSize(new java.awt.Dimension(285, 350));
        InterfacesStatusjFrame.addComponentListener(new java.awt.event.ComponentAdapter() {
            public void componentHidden(java.awt.event.ComponentEvent evt) {
                InterfacesStatusjFrameComponentHidden(evt);
            }
            public void componentShown(java.awt.event.ComponentEvent evt) {
                InterfacesStatusjFrameComponentShown(evt);
            }
        });

        jLabel16.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N
        jLabel16.setText("Interface Status");

        InterfaceStatusjTable.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {

            },
            new String [] {
                "Interface", "IP Address", "OK?", "Method", "Status", "Protocol"
            }
        ) {
            Class[] types = new Class [] {
                java.lang.String.class, java.lang.String.class, java.lang.String.class, java.lang.String.class, java.lang.String.class, java.lang.String.class
            };

            public Class getColumnClass(int columnIndex) {
                return types [columnIndex];
            }
        });
        jScrollPane6.setViewportView(InterfaceStatusjTable);

        javax.swing.GroupLayout InterfacesStatusjFrameLayout = new javax.swing.GroupLayout(InterfacesStatusjFrame.getContentPane());
        InterfacesStatusjFrame.getContentPane().setLayout(InterfacesStatusjFrameLayout);
        InterfacesStatusjFrameLayout.setHorizontalGroup(
            InterfacesStatusjFrameLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(InterfacesStatusjFrameLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(InterfacesStatusjFrameLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(InterfacesStatusjFrameLayout.createSequentialGroup()
                        .addComponent(jLabel16)
                        .addGap(0, 0, Short.MAX_VALUE))
                    .addComponent(jScrollPane6, javax.swing.GroupLayout.DEFAULT_SIZE, 563, Short.MAX_VALUE))
                .addContainerGap())
        );
        InterfacesStatusjFrameLayout.setVerticalGroup(
            InterfacesStatusjFrameLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(InterfacesStatusjFrameLayout.createSequentialGroup()
                .addGap(14, 14, 14)
                .addComponent(jLabel16)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jScrollPane6, javax.swing.GroupLayout.DEFAULT_SIZE, 483, Short.MAX_VALUE)
                .addContainerGap())
        );

        InterfacesSerialTypejFrame.setTitle("Serial Type");
        InterfacesSerialTypejFrame.setMinimumSize(new java.awt.Dimension(239, 300));
        InterfacesSerialTypejFrame.addComponentListener(new java.awt.event.ComponentAdapter() {
            public void componentShown(java.awt.event.ComponentEvent evt) {
                InterfacesSerialTypejFrameComponentShown(evt);
            }
        });

        interfaceSerialTypeList.setModel(new javax.swing.DefaultListModel());
        jScrollPane5.setViewportView(interfaceSerialTypeList);

        javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);
        jPanel2.setLayout(jPanel2Layout);
        jPanel2Layout.setHorizontalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 219, Short.MAX_VALUE)
            .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addComponent(jScrollPane5, javax.swing.GroupLayout.DEFAULT_SIZE, 219, Short.MAX_VALUE))
        );
        jPanel2Layout.setVerticalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 256, Short.MAX_VALUE)
            .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addComponent(jScrollPane5, javax.swing.GroupLayout.DEFAULT_SIZE, 256, Short.MAX_VALUE))
        );

        javax.swing.GroupLayout InterfacesSerialTypejFrameLayout = new javax.swing.GroupLayout(InterfacesSerialTypejFrame.getContentPane());
        InterfacesSerialTypejFrame.getContentPane().setLayout(InterfacesSerialTypejFrameLayout);
        InterfacesSerialTypejFrameLayout.setHorizontalGroup(
            InterfacesSerialTypejFrameLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 239, Short.MAX_VALUE)
            .addGroup(InterfacesSerialTypejFrameLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(InterfacesSerialTypejFrameLayout.createSequentialGroup()
                    .addContainerGap()
                    .addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addContainerGap()))
        );
        InterfacesSerialTypejFrameLayout.setVerticalGroup(
            InterfacesSerialTypejFrameLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 300, Short.MAX_VALUE)
            .addGroup(InterfacesSerialTypejFrameLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, InterfacesSerialTypejFrameLayout.createSequentialGroup()
                    .addContainerGap(33, Short.MAX_VALUE)
                    .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addContainerGap()))
        );

        setMinimumSize(new java.awt.Dimension(462, 167));
        setPreferredSize(new java.awt.Dimension(462, 167));

        ConsolejTextArea.setColumns(20);
        ConsolejTextArea.setEditable(false);
        ConsolejTextArea.setRows(5);
        jScrollPane1.setViewportView(ConsolejTextArea);

        SendjButton.setText("Send");
        SendjButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                SendjButtonActionPerformed(evt);
            }
        });

        jToolBar1.setRollover(true);

        ClockjLabel.setText("12:00 AM");
        jToolBar1.add(ClockjLabel);

        jToolBar2.setRollover(true);

        InterfacesjLabel.setText("Interfaces");
        jToolBar2.add(InterfacesjLabel);

        jToolBar3.setRollover(true);

        TypejLabel.setText("Slave");
        jToolBar3.add(TypejLabel);

        jToolBar4.setRollover(true);

        IosjLabel.setText("Cisco 1700v v1.5 with IOS version "+version);
        jToolBar4.add(IosjLabel);

        String[] leveltypes = {"Logged_Off", "Default", "Enable", "Config", "appnB", "ca_identityB", "cfg_lan_Ether_10B", "cfg_adap_Ether_10_1B", "config_cert_chainB", "config_controllerB", "config_ctrl_casB", "config_crypto_mapB", "config_crypto_transB", "config_dialpeerB", "config_ext_naclB", "config_std_naclB", "config_hubB", "Interface Config", "config_if_atm_vcB", "config_vc_classB", "config_subifB", "config_ipx_routerB", "config_isakmpB", "config_keychainB", "config_keychain_keyB", "VTY", "config_map_classB", "config_map_listB", "config_modem_poolB", "config_poll_grB", "config_pubkeyB", "config_pubkey_keyB", "config_route_mapB", "Router Config", "config_rtrB", "config_voiceportB", "lane_config_databB", "mpoa_client_configB", "mpoa_server_configB", "tn3270_serverB", "tn3270_puB", "tn3270_dlurB", "tn3270_dlur_sapB", "tn3270_dlur_puB", "configBAsk", "Logged_OffAsk", "Logged_OffConsoleAsk"};
        levelselectorJComboBox.setModel(new javax.swing.DefaultComboBoxModel(leveltypes));
        levelselectorJComboBox.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                levelselectorJComboBoxActionPerformed(evt);
            }
        });

        CommandjComboBox.setEditable(true);
        CommandjComboBox.setModel(new javax.swing.DefaultComboBoxModel());
        db.add("");
        db.add("show run");
        addDB();

        textField=(JTextField) CommandjComboBox.getEditor().getEditorComponent();
        java.awt.event.KeyAdapter KeyA=new java.awt.event.KeyAdapter() {
            public void keyReleased(java.awt.event.KeyEvent evt){
                CommandjComboBoxKeyReleased(evt);
            }
        };

        textField.addKeyListener(KeyA);

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
        this.setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jScrollPane1)
                    .addGroup(layout.createSequentialGroup()
                        .addComponent(levelselectorJComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(CommandjComboBox, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(SendjButton, javax.swing.GroupLayout.PREFERRED_SIZE, 57, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addContainerGap())
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                .addComponent(jToolBar4, javax.swing.GroupLayout.PREFERRED_SIZE, 127, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(jToolBar3, javax.swing.GroupLayout.DEFAULT_SIZE, 97, Short.MAX_VALUE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jToolBar2, javax.swing.GroupLayout.PREFERRED_SIZE, 78, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jToolBar1, javax.swing.GroupLayout.PREFERRED_SIZE, 138, javax.swing.GroupLayout.PREFERRED_SIZE))
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 96, Short.MAX_VALUE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(SendjButton)
                    .addComponent(levelselectorJComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(CommandjComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(jToolBar1, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jToolBar2, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jToolBar3, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jToolBar4, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE)))
        );
    }// </editor-fold>//GEN-END:initComponents

    private void sendCommand(String Command){
        globalRouterHandler.sendUserCommand(Command + "\r\n");
        checkDB(Command);
        textField.setText("");
    }
    
    private void checkDB(String Command){
        for (int i = 0; i < db.size(); i++) {
            if(db.get(i).equals(Command)){
                return;
            }
        }
        db.add(Command);
        CommandjComboBox.addItem(makeObj(Command));
    }
    
    private void addDB(){
        CommandjComboBox.removeAllItems();
        for (int i = 0; i < db.size(); i++) {
            CommandjComboBox.addItem(makeObj(db.get(i)));
        }
    }
    
    private void addHelp(){
        CommandjComboBox.removeAllItems();
//        for (int i = 0; i < db.size(); i++) {
//            CommandjComboBox.addItem(makeObj(db.get(i)));
//        }
    }
    
    private Object makeObj(final String item)  {
        return new Object() { public String toString() { return item; } };
    }
    
    private void CommandjComboBoxKeyReleased(java.awt.event.KeyEvent evt) {
        int Key=evt.getKeyCode();
        if(evt.getKeyChar()=='?'){
            if(textField.getText().contains(" ?")){
                System.out.println("Abre o Help");
            }else if(textField.getText().contains("?")){
                System.out.println("Mostra o Help do commando");
            }
        }else{
            if(Key==KeyEvent.VK_DOWN){
                System.out.println("DOWN");
            }else{
                if(Key==KeyEvent.VK_ENTER){
                    sendCommand(textField.getText());
                }
            }
        }
    }
    
    private void InterfacesStatusjFrameComponentHidden(java.awt.event.ComponentEvent evt) {// GEN-FIRST:event_InterfacesStatusjFrameComponentHidden
        timer.cancel();
    }// GEN-LAST:event_InterfacesStatusjFrameComponentHidden

    private void InterfacesSerialTypejFrameComponentShown(java.awt.event.ComponentEvent evt) {// GEN-FIRST:event_InterfacesSerialTypejFrameComponentShown
        globalRouterHandler.getSynchroState();
        // ih.parseShowControllersInfo(ConsolejTextArea.getText());
    }// GEN-LAST:event_InterfacesSerialTypejFrameComponentShown

    private void showupdateInterfaceStatusJButtonActionPerformed(java.awt.event.ActionEvent evt) {// GEN-FIRST:event_showupdateInterfaceStatusJButtonActionPerformed
    }// GEN-LAST:event_showupdateInterfaceStatusJButtonActionPerformed

    private void InterfacesStatusjFrameComponentShown(java.awt.event.ComponentEvent evt) {
        try {
            // GEN-FIRST:event_InterfacesStatusjFrameComponentShown
            // thread para atualizar status das interfaces
            statusTableModel = (DefaultTableModel) InterfaceStatusjTable.getModel();
            GUISolutionModel GuiSol = new GUISolutionModel(statusTableModel, interfacesJTabbedPane, mi, index);
            final RouterHandler localRouterHandler = new RouterHandler(host, port, GuiSol, globalRouterHandler.getAuthenticationHandler());
            GuiSol.setRouterHandler(localRouterHandler);

            timer = new Timer();
            timer.scheduleAtFixedRate(new TimerTask() {

                @Override
                public void run() {
                    System.out.println("RUN");
                    localRouterHandler.showIpInterfaceBrief();
                    InterfaceStatusjTable.setModel(localRouterHandler.getGUISolution().getStatusTableModel());
                }
            }, 0, 1500);// 1.5 segundos
        } // GEN-LAST:event_InterfacesStatusjFrameComponentShown
        catch (ConnectException ex) {
            Logger.getLogger(CLI.class.getName()).log(Level.SEVERE, null, ex);
        } catch (SocketException ex) {
            Logger.getLogger(CLI.class.getName()).log(Level.SEVERE, null, ex);
        } catch (IOException ex) {
            Logger.getLogger(CLI.class.getName()).log(Level.SEVERE, null, ex);
        }

    }// GEN-LAST:event_InterfacesStatusjFrameComponentShown

    private void RRemovejButtonActionPerformed(java.awt.event.ActionEvent evt) {// GEN-FIRST:event_RRemovejButtonActionPerformed

        String route = (String) RjList.getSelectedValue();
        globalRouterHandler.removeStaticRoute(route);
        staticListModel = (DefaultListModel<String>) RjList.getModel();
        staticListModel.remove(RjList.getSelectedIndex());
        RjList.setModel(staticListModel);
    }// GEN-LAST:event_RRemovejButtonActionPerformed

    private void PasswordOkjButtonActionPerformed(java.awt.event.ActionEvent evt) {// GEN-FIRST:event_PasswordOkjButtonActionPerformed
        // TODO completar:
        String secretpass = new String(SecretjPasswordField.getPassword());
        String vtypass = new String(VTYjPasswordField.getPassword());
        String enablepass = new String(EnablejPasswordField.getPassword());

        if (secretpass.equalsIgnoreCase(enablepass)) {
            JOptionPane.showMessageDialog(this, "Enable secret must be different from enable password.");
        } else {

            if (secretpass.length() > 0) {
                globalRouterHandler.setEnableSecretPass(secretpass);
            }
            if (vtypass.length() > 0) {
                globalRouterHandler.setVTYPass(vtypass);

            }

            if (enablepass.length() > 0) {
                globalRouterHandler.setEnablePass(enablepass);
            }
        }


    }// GEN-LAST:event_PasswordOkjButtonActionPerformed

    private void AddDyRoutejButton1ActionPerformed(java.awt.event.ActionEvent evt) {// GEN-FIRST:event_AddDyRoutejButton1ActionPerformed
        Validation v = Validation.getInstance();
        if (v.validateIP(DyRNetworkjTextField1.getText())) {
            globalRouterHandler.setDynamicRoute(DyRNetworkjTextField1.getText());
            dynamicListModel = (DefaultListModel<String>) DyRjList.getModel();
            dynamicListModel.addElement(DyRNetworkjTextField1.getText());
            DyRjList.setModel(dynamicListModel);
            DyRNetworkjTextField1.setText("");
        }
    }// GEN-LAST:event_AddDyRoutejButton1ActionPerformed

    private void ConnectivityPingButtonActionPerformed(java.awt.event.ActionEvent evt) {// GEN-FIRST:event_ConnectivityPingButtonActionPerformed
        Validation v = Validation.getInstance();
        if (v.validateIP(ConnectivityIPTextField.getText())) {
            globalRouterHandler.ping(ConnectivityIPTextField.getText());
        }
    }// GEN-LAST:event_ConnectivityPingButtonActionPerformed

    private void levelselectorJComboBoxActionPerformed(java.awt.event.ActionEvent evt) {// GEN-FIRST:event_levelselectorJComboBoxActionPerformed
        JComboBox cb = (JComboBox) evt.getSource();
        if (cb.getSelectedIndex() == 0) {
            SettingsjFrame.setVisible(false);
            globalRouterHandler.disconnect();
        } else {
            globalRouterHandler.setLevel(cb.getSelectedIndex());
        }
    }// GEN-LAST:event_levelselectorJComboBoxActionPerformed

    private void TimejFormattedTextFieldActionPerformed(java.awt.event.ActionEvent evt) {// GEN-FIRST:event_TimejFormattedTextFieldActionPerformed
        // TODO add your handling code here:
    }// GEN-LAST:event_TimejFormattedTextFieldActionPerformed

    private void AddRoutejButtonActionPerformed(java.awt.event.ActionEvent evt) {// GEN-FIRST:event_AddRoutejButtonActionPerformed
        Validation v = Validation.getInstance();
        if (v.validateIP(RNetworkjTextField.getText())
                && (v.validateMask(RMaskjTextField.getText()) && (v.validateIP(RNextHopjTextField.getText())))) {
            globalRouterHandler.setStaticRoute(RNetworkjTextField.getText(), RMaskjTextField.getText(), RNextHopjTextField.getText());

            staticListModel = (DefaultListModel<String>) RjList.getModel();
            staticListModel.addElement(RNetworkjTextField.getText() + " with mask " + RMaskjTextField.getText() + " via "
                    + RNextHopjTextField.getText());
            RjList.setModel(staticListModel);

            RNetworkjTextField.setText("");
            RMaskjTextField.setText("");
            RNextHopjTextField.setText("");

        }
    }// GEN-LAST:event_AddRoutejButtonActionPerformed

    private void SendjButtonActionPerformed(java.awt.event.ActionEvent evt) {// GEN-FIRST:event_SendjButtonActionPerformed
        if (globalRouterHandler != null) {
            if (textField.getText().contains("?")) {
                if (textField.getText().contains(" ?")) {
                    globalRouterHandler.setShowPossibleCommands(true);
                    System.out.println("ESPACO!!!!!");
                } else {
                    globalRouterHandler.setHelp(true);
                    System.out.println("INTERROGA!!!!!");
                }
            }
            sendCommand(textField.getText());
        }
    }// GEN-LAST:event_SendjButtonActionPerformed

    private void DyRRemovejButtonActionPerformed(java.awt.event.ActionEvent evt) {// GEN-FIRST:event_DyRRemovejButtonActionPerformed
        String route = (String) DyRjList.getSelectedValue();
        globalRouterHandler.removeDynamicRoute(route);
        dynamicListModel = (DefaultListModel<String>) DyRjList.getModel();
        dynamicListModel.remove(DyRjList.getSelectedIndex());
        DyRjList.setModel(dynamicListModel);
    }// GEN-LAST:event_DyRRemovejButtonActionPerformed

    private void GlobalOkjButtonActionPerformed(java.awt.event.ActionEvent evt) {// GEN-FIRST:event_GlobalOkjButtonActionPerformed
        if (!HostNamejTextField.getText().equals("")) {
            globalRouterHandler.setRouterName(HostNamejTextField.getText());
            this.setName(HostNamejTextField.getText());
        }

        Validation v = Validation.getInstance();
        if ((!DatejFormattedTextField.getText().equals("")) && (!TimejFormattedTextField.getText().equals(""))) {
            if (v.validateDate(DatejFormattedTextField.getText(), TimejFormattedTextField.getText())) {
                globalRouterHandler.setDateTime(DatejFormattedTextField.getText(), TimejFormattedTextField.getText());

            }
        }

    }// GEN-LAST:event_GlobalOkjButtonActionPerformed

    private void VlanOkjButtonActionPerformed(java.awt.event.ActionEvent evt) {// GEN-FIRST:event_VlanOkjButtonActionPerformed
        if (!VlanNumberjTextField.getText().equals("") && !VlanNamejTextField.getText().equals("")) {
            globalRouterHandler.setVLanConfig(VlanNumberjTextField.getText(), VlanNamejTextField.getText());

            VlanNumberjTextField.setText("");
            VlanNamejTextField.setText("");
        }

    }// GEN-LAST:event_VlanOkjButtonActionPerformed
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton AddDyRoutejButton1;
    private javax.swing.JButton AddRoutejButton;
    private javax.swing.JLabel ClockjLabel;
    private javax.swing.JFrame CommandHelpjFrame;
    private javax.swing.JComboBox CommandjComboBox;
    private javax.swing.JTextField ConnectivityIPTextField;
    private javax.swing.JButton ConnectivityPingButton;
    public javax.swing.JFrame ConnectivityjFrame;
    private javax.swing.JTextArea ConsolejTextArea;
    private javax.swing.JFormattedTextField DatejFormattedTextField;
    private javax.swing.JTextField DyRNetworkjTextField1;
    private javax.swing.JButton DyRRemovejButton;
    private javax.swing.JList DyRjList;
    private javax.swing.JPasswordField EnablejPasswordField;
    private javax.swing.JButton GlobalCanceljButton;
    private javax.swing.JButton GlobalOkjButton;
    private javax.swing.JTextField HostNamejTextField;
    private javax.swing.JTable InterfaceStatusjTable;
    public javax.swing.JFrame InterfacesConfigjFrame;
    public javax.swing.JFrame InterfacesSerialTypejFrame;
    public javax.swing.JFrame InterfacesStatusjFrame;
    private javax.swing.JLabel InterfacesjLabel;
    private javax.swing.JLabel IosjLabel;
    private javax.swing.JButton PasswordCanceljButton;
    private javax.swing.JButton PasswordOkjButton;
    private javax.swing.JTextField RMaskjTextField;
    private javax.swing.JTextField RNetworkjTextField;
    private javax.swing.JTextField RNextHopjTextField;
    private javax.swing.JButton RRemovejButton;
    private javax.swing.JList RjList;
    public javax.swing.JFrame RoutingjFrame;
    private javax.swing.JPasswordField SecretjPasswordField;
    private javax.swing.JButton SendjButton;
    public javax.swing.JFrame SettingsjFrame;
    public javax.swing.JFrame SwitchingjFrame;
    private javax.swing.JFormattedTextField TimejFormattedTextField;
    private javax.swing.JLabel TypejLabel;
    private javax.swing.JPasswordField VTYjPasswordField;
    private javax.swing.JButton VlanCanceljButton;
    private javax.swing.JTextField VlanNamejTextField;
    private javax.swing.JTextField VlanNumberjTextField;
    private javax.swing.JButton VlanOkjButton;
    private javax.swing.JList interfaceSerialTypeList;
    private javax.swing.JTabbedPane interfacesJTabbedPane;
    private javax.swing.JButton jButton1;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel10;
    private javax.swing.JLabel jLabel11;
    private javax.swing.JLabel jLabel12;
    private javax.swing.JLabel jLabel13;
    private javax.swing.JLabel jLabel14;
    private javax.swing.JLabel jLabel15;
    private javax.swing.JLabel jLabel16;
    private javax.swing.JLabel jLabel17;
    private javax.swing.JLabel jLabel18;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel20;
    private javax.swing.JLabel jLabel21;
    private javax.swing.JLabel jLabel22;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JLabel jLabel4;
    private javax.swing.JLabel jLabel5;
    private javax.swing.JLabel jLabel6;
    private javax.swing.JLabel jLabel7;
    private javax.swing.JLabel jLabel8;
    private javax.swing.JLabel jLabel9;
    private javax.swing.JPanel jPanel2;
    private javax.swing.JPanel jPanel3;
    private javax.swing.JPanel jPanel5;
    private javax.swing.JPanel jPanel6;
    private javax.swing.JPanel jPanel7;
    private javax.swing.JPanel jPanel8;
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JScrollPane jScrollPane2;
    private javax.swing.JScrollPane jScrollPane3;
    private javax.swing.JScrollPane jScrollPane4;
    private javax.swing.JScrollPane jScrollPane5;
    private javax.swing.JScrollPane jScrollPane6;
    private javax.swing.JSeparator jSeparator1;
    private javax.swing.JSeparator jSeparator2;
    private javax.swing.JTabbedPane jTabbedPane4;
    private javax.swing.JTabbedPane jTabbedPane5;
    private javax.swing.JTable jTable1;
    private javax.swing.JTextField jTextField1;
    private javax.swing.JToolBar jToolBar1;
    private javax.swing.JToolBar jToolBar2;
    private javax.swing.JToolBar jToolBar3;
    private javax.swing.JToolBar jToolBar4;
    private javax.swing.JComboBox levelselectorJComboBox;
    // End of variables declaration//GEN-END:variables
}
